<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="../templates/ui.xhtml">
	
	<ui:define name="head">
		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
	</ui:define>

	<ui:define name="content">

		<h1 class="title ui-widget-header ui-corner-all">GMap - Markers</h1>
		<div class="entry">
			<p>MapModel API is used to add markers to the map. Marker class has various configuration options like
			custom icons, dragging, title text and more.</p>

			<p:gmap center="36.890257,30.707417" zoom="13" type="HYBRID" style="width:600px;height:400px"
				model="#{mapBean.simpleModel}" />
			
			<h3>Source</h3>
			<p:tabView>
				<p:tab title="gmapMarkers.xhtml">
					<pre name="code" class="xml">
&lt;p:gmap center="36.890257,30.707417" zoom="13" type="HYBRID" 
		style="width:600px;height:400px"
		model="\#{mapBean.simpleModel}" /&gt;
					</pre>
				</p:tab>
				
				<p:tab title="MapBean.java">
					<pre name="code" class="java">
package org.primefaces.examples.view;

import java.io.Serializable;

import org.primefaces.model.map.DefaultMapModel;
import org.primefaces.model.map.LatLng;
import org.primefaces.model.map.MapModel;
import org.primefaces.model.map.Marker;

public class MapBean implements Serializable {

	private MapModel simpleModel;

	public MapBean() {
		simpleModel = new DefaultMapModel();
		
		//Shared coordinates
		LatLng coord1 = new LatLng(36.879466, 30.667648);
		LatLng coord2 = new LatLng(36.883707, 30.689216);
		LatLng coord3 = new LatLng(36.879703, 30.706707);
		LatLng coord4 = new LatLng(36.885233, 30.702323);
		
		//Basic marker
		simpleModel.addOverlay(new Marker(coord1, "Konyaalti"));
		simpleModel.addOverlay(new Marker(coord2, "Ataturk Parki"));
		simpleModel.addOverlay(new Marker(coord3, "Karaalioglu Parki"));
		simpleModel.addOverlay(new Marker(coord4, "Kaleici"));
	}

	public MapModel getSimpleModel() {
		return simpleModel;
	}
}
					</pre>
				</p:tab>
			</p:tabView>
			
												
		</div>
	</ui:define>
</ui:composition>